import request from "@/utils/request";

export async function queryList(
  params: {
    // query
    /** current */
    current?: number;
    /** pageSize */
    pageSize?: number;
    type: number;
  },
  options?: { [key: string]: any },
) {
  const res = await request('/grade-item', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
  console.log('res.data', res.data)
  return {
    success: res.data.records && res.data.records.length >= 0,
    data: res.data.records ?? [],
    total: res.data.total ?? 0
  }
}